{* discount managment *}

<form name='MainForm' method=POST>

<h3>{$smarty.const.ADMIN_DISCOUNTS}</h3>
<p>

{$smarty.const.ADMIN_DISCOUNTS_PROMPT}
<br>

	{$control}

<p>
  <input name="discount_type_save" type=submit value='{$smarty.const.SAVE_BUTTON}'>
</p>


<h5>{$smarty.const.ADMIN_DISCOUNT_GENERAL_ORDER_PRICE_TITLE}</h5>

{$smarty.const.ADMIN_DISCOUNT_GENERAL_ORDER_PRICE_PROMPT}
<br>
<br>

{if $error}
	ERROR_IRCKA
{/if}

<table cellspacing=1 cellpadding=5 bgcolor=#bedddb border=0>

	<tr bgcolor=#56afd6>
		<td align=middle colspan=3>
			<b>{$smarty.const.ADMIN_DISCOUNT_GENERAL_ORDER_PRICE_TITLE}</b>
		</td>
	</tr>

	<tr>
		<td align=middle>
			{$smarty.const.ADMIN_GENERAL_ORDER_PRICE}
		</td>
		<td align=middle>
			{$smarty.const.ADMIN_GENERAL_ORDER_PRICE_RANGE}
		</td>
		<td>
			&nbsp;
		</td>
	</tr>

	{section name=i loop=$discounts}
	<tr bgcolor=white>
		<td>
			<input type=text name='price_range_{$discounts[i].discount_id}' 
				value='{$discounts[i].price_range}'>
		</td>
		<td>
			<input type=text name='percent_discount_{$discounts[i].discount_id}' 
				value='{$discounts[i].percent_discount}'>
		</td>
		<td>
			<a href="javascript:confirmDelete({$discounts[i].discount_id},'{$smarty.const.QUESTION_DELETE_CONFIRMATION}','admin.php?dpt=custord&sub=discounts&delete=');">
					<img src="images/remove.jpg" border=0 alt="{$smarty.const.DELETE_BUTTON}">
			</a>
		</td>
	</tr>
	{/section}

	<tr bgcolor=#56afd6>
		<td align=middle colspan=3><b>{$smarty.const.ADD_BUTTON}</b></td>
	</tr>

	<tr bgcolor=white> 
		<td>
			<input type=text name='new_price_range'>
		</td>
		<td>
			<input type=text name='new_percent_discount'>% 
		</td>
		<td>&nbsp;</td>
    </tr>

</table>

<p>
	<input name="save_order_price_discounts" type=submit value='{$smarty.const.SAVE_BUTTON}'>
</p>

</form>